import type { AxiosRequestConfig, AxiosResponse,InternalAxiosRequestConfig } from 'axios'


export interface ServiceInterceptor<T = AxiosResponse>{
  requestSuccessFn?:(config:AxiosRequestConfig) => AxiosRequestConfig
  // requestSuccessFn?: (config: InternalAxiosRequestConfig) => InternalAxiosRequestConfig,
  requestFailureFn?:(err:any) => any
  responseSuccessFn?:(res:T) => T
  responseFailureFn?:(err:any) => any
}
// 针对AxiosRequestConfig配置进行扩展
export interface ServiceRequestConfig<T = AxiosResponse> extends AxiosRequestConfig{
  interceptors?:ServiceInterceptor<T>
}